package com.sky.mapper;

import com.sky.entity.SetmealDish;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

public interface setmealDishMapper {

    @Select("select count(*) from setmeal_dish where id = #{id}")
    Integer countById(Long id);

    void addSetmealDishs(List<SetmealDish> dishes);

    List<SetmealDish> getSetmealDishById(Long id);

    void delteSetmealDishByIds(List<Long> ids);

    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void delteSetmealDishById(Long id);

    @Select("select * from setmeal_dish where id = #{id}")
    List<DishItemVO> dishList(Long id);
}

